{$layout}
{$template "menu"}

<form class="ui form" data-tea-action="$" data-tea-success="success">
    <csrf-token></csrf-token>
    <input type="hidden" name="accountId" :value="account.id"/>
    <table class="ui table definition selectable">
        <tr>
            <td>当前账户余额</td>
            <td>{{account.total}}元</td>
        </tr>
        <tr>
            <td class="title">操作类型 *</td>
            <td>
                <select class="ui dropdown auto-width" name="eventType" v-model="eventType">
                    <option v-for="eventType in eventTypes" :value="eventType.code">{{eventType.name}}</option>
                </select>
                <p class="comment">{{event.description}}</p>
            </td>
        </tr>
        <tr>
            <td>操作金额 *</td>
            <td>
               <div class="ui input left right labeled">
                   <span class="ui label green" v-if="event != null && event.isPositive">+</span>
                   <span class="ui label red" v-if="event != null && !event.isPositive">-</span>
                   <input type="text" name="delta" value="" style="width: 8em" maxlength="8"/>
                   <span class="ui label">元</span>
               </div>
            </td>
        </tr>
        <tr>
            <td>描述</td>
            <td>
                <textarea rows="3" name="description"></textarea>
            </td>
        </tr>
    </table>
    <submit-btn></submit-btn>
</form>